using System;
using System.Collections.Generic;


namespace Gfw.Models.Account
{
	[Serializable]
	public partial class ActCompanyBargain: IEquatable<ActCompanyBargain>
	{

		#region Private Members

		private string _id; 
		private string _userid; 
		private int _tradetype; 
		private decimal _income; 
		private decimal _outlay; 
		private decimal _balance; 
		private DateTime? _tradedate; 
		private string _tradeabstract; 
		private string _awardserialno; 
		private string _taxationserialno; 		
		#endregion

		#region Constructor

		public ActCompanyBargain()
		{
			_id = String.Empty; 
			_userid = String.Empty; 
			_tradetype = 0; 
			_income = 0; 
			_outlay = 0; 
			_balance = 0; 
			_tradedate = null; 
			_tradeabstract = String.Empty; 
			_awardserialno = String.Empty; 
			_taxationserialno = String.Empty; 
		}
		#endregion // End of Default ( Empty ) Class Constuctor

		#region Public Properties
			
		public virtual string Id
		{
			get
			{ 
				return _id;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Id", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Id", value, value.ToString());
				
				_id = value;
			}
		}
			
		public virtual string Userid
		{
			get
			{ 
				return _userid;
			}

			set	
			{	
				if( value == null )
					throw new ArgumentOutOfRangeException("Null value not allowed for Userid", value, "null");
				
				if(  value.Length > 40)
					throw new ArgumentOutOfRangeException("Invalid value for Userid", value, value.ToString());
				
				_userid = value;
			}
		}
			
		public virtual int TradeType
		{
			get
			{ 
				return _tradetype;
			}
			set
			{
				_tradetype = value;
			}

		}
			
		public virtual decimal Income
		{
			get
			{ 
				return _income;
			}
			set
			{
				_income = value;
			}

		}
			
		public virtual decimal Outlay
		{
			get
			{ 
				return _outlay;
			}
			set
			{
				_outlay = value;
			}

		}
			
		public virtual decimal Balance
		{
			get
			{ 
				return _balance;
			}
			set
			{
				_balance = value;
			}

		}
			
		public virtual DateTime? TradeDate
		{
			get
			{ 
				return _tradedate;
			}
			set
			{
				_tradedate = value;
			}

		}
			
		public virtual string TradeAbstract
		{
			get
			{ 
				return _tradeabstract;
			}

			set	
			{	
				if(  value != null &&  value.Length > 256)
					throw new ArgumentOutOfRangeException("Invalid value for TradeAbstract", value, value.ToString());
				
				_tradeabstract = value;
			}
		}
			
		public virtual string AwardSerialNo
		{
			get
			{ 
				return _awardserialno;
			}

			set	
			{	
				if(  value != null &&  value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for AwardSerialNo", value, value.ToString());
				
				_awardserialno = value;
			}
		}
			
		public virtual string TaxationSerialNo
		{
			get
			{ 
				return _taxationserialno;
			}

			set	
			{	
				if(  value != null &&  value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for TaxationSerialNo", value, value.ToString());
				
				_taxationserialno = value;
			}
		}
			
				
		#endregion 

		#region Public Functions

		#endregion //Public Functions

		#region IEquatable members

		public virtual bool Equals(ActCompanyBargain other)
		{
			if (other == this)
				return true;
		
			return ( other != null ) &&
				( this._id == other.Id );
				   
		}

		#endregion
		
	}
}
